﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using WorkRecorder.Business;
using System.Collections.ObjectModel;
using System.Windows.Controls;

namespace WorkRecorder.Helpers.Converters
{
    public class CollectionCountConverter : IValueConverter
    {
        private int counter = 0;

        private ObservableCollection<Record> tempCol = null;

        public CollectionCountConverter() { }

 
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var collection = value as ObservableCollection<Record>;
 
            int count = collection.Count;
            return count;

  
 
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
